USE [NANS21V]
GO

/****** Object:  StoredProcedure [dbo].[SyozokuBetsuList]    Script Date: 01/12/2023 08:39:02 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SyozokuBetsuList]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[SyozokuBetsuList]
GO

CREATE PROCEDURE [dbo].[SyozokuBetsuList]
	@TAIKAINO int
AS
	SELECT TS.SYOZOKUNO,
		TS.SYOZOKUKANA + '<br/>' + TS.SYOZOKUMEI AS SYOZOKUMEI,
        TST.SYOZOKUTIMEI 
	FROM TBL_SYOZOKU AS TS
    INNER JOIN TBL_SYOZOKUTI AS TST
    ON TS.SYOZOKUTINO = TST.SYOZOKUTINO
	WHERE TS.TAIKAINO = @TAIKAINO
	ORDER BY TS.SYOZOKUNO